﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FrameWork.Setting;
using System.ComponentModel;
using FrameWork.Design;
using System.Net.NetworkInformation;
using System.Net;

namespace ScreenMonitor.ClientLib
{
    /// <summary>
    /// 客户端全局设定
    /// </summary>
    [SettingParentDefine]
    public static class ClientGlobalSetting
    {

        /// <summary>
        /// 客户端使用的网络适配器描述
        /// </summary>
        [SettingItemDefine(SettingValueType.String, "NotSet")]
        [Browsable(true)]
        [DisplayName("网络适配器绑定")]
        [Description("设定客户端绑定的网络适配器")]
        [DefaultValue("NotSet")]
        [TypeConverter(typeof(NetworkInterfaceConverter))]
        public static string ClientBindAdapter { get; set; }

        /// <summary>
        /// 获取客户端单播地址
        /// </summary>
        public static IPAddress ClientIpAddr { get; set; }

        /// <summary>
        /// 获取客户端广播地址
        /// </summary>
        public static IPAddress ClientMulticastIpAddr { get; set; }

        /// <summary>
        /// 客户端名称
        /// </summary>
        [SettingItemDefine(SettingValueType.String,"未命名客户端")]
        [Browsable(true)]
        [DisplayName("名称")]
        [Description("表示客户端在服务端显示的名称")]
        [DefaultValue("未命名客户端")]
        public static string ClientName { get; set; }

        /// <summary>
        /// 客户端Tcp端口
        /// </summary>
        [SettingItemDefine(SettingValueType.Int32,3566)] 
        [Browsable(true)]
        [DisplayName("客户端Tcp端口")]
        [Description("表示客户端与服务端进行Tcp通信的端口")]
        [DefaultValue(3566)]
       
        public static int ClientTcpPort { get; set; }

        /// <summary>
        /// 客户端Udp端口
        /// </summary>
        [SettingItemDefine(SettingValueType.Int32,3567)]
        [Browsable(true)]
        [DisplayName("客户端Udp端口")]
        [Description("表示客户端与服务端进行Udp通信的端口")]
        [DefaultValue(3567)]
        public static int ClientUdpPort { get; set; }

        /// <summary>
        /// 服务端Udp端口
        /// </summary>
        [SettingItemDefine(SettingValueType.Int32,3569)]
        [Browsable(true)]
        [DisplayName("服务端Udp端口")]
        [Description("表示客户端与服务端进行Udp通信的端口")]
        [DefaultValue(3569)]
        public static int ServerUdpPort { get; set; }

    }
}
